#ifndef _SDKLIST_H
#define _SDKLIST_H

typedef struct
{
    void *mData;
    void *mNext;
} ATTRIBUTE ListItem;

typedef struct
{
    bool mIsUsing;
    ListItem mItem;
} ATTRIBUTE Element;

typedef struct
{
    s32 mListCount;
    ListItem *mFontItem;
    ListItem *mEndItem;
    Element *mElementList;
    u32 mListMaxCount;
    bool mIsPersistentMem;
} ATTRIBUTE SdkSysList;

extern s32 sdkListAddAtFront(SdkSysList *list, const void * data);

extern s32 sdkListAddAtEnd(SdkSysList *list, const void * data);

extern SdkSysList *sdkListCreate(u32 maxCount, bool isPersistentMem);

extern void sdkListDestroy(SdkSysList *list);

extern void *sdkListGetAt(SdkSysList *list, s32 index);

extern s32 sdkListGetCnt(const SdkSysList *list);

extern s32 sdkListRemoveAt(SdkSysList *list, s32 index);

extern s32 sdkListRemoveData(SdkSysList *list, const void *data);

extern void sdkListClear(SdkSysList *list);

#endif
